<!--功能：商品列表可块级显示也可条状显示-->
<!--创建人：李志伟-->
<!--时间：2017年2月7日11:57:58-->
<script src="__TEMP__/{$style}/public/js/goods/controlGoods.js"></script>
<script src="__TEMP__/{$style}/public/js/ns_collections.js" type="text/javascript"></script>
<!-- 地址选择 _start -->
<script type="text/javascript" src="__TEMP__/{$style}/public/js/ns_select_region.js"></script>
<input type="hidden" id="hidden_province" value="{$user_location.province}" />
<input type="hidden" id="hidden_city" value="{$user_location.city}" />
<div class="main">
	<div id="filter">
		<!--排序-->
		<form method="get" name="listform" action="" style="position: relative;">
			<div class="fore1">
				<dl class="order">
				<!-- 默认 -->
				{if condition=" $order=='' "}<dd class="first curr">{else/}<dd>{/if}
					<a href="SHOP_MAIN/goods/goodslist.html?{$url_parameter_not_order}">综合</a>
					</dd>
				<!-- 销量 -->
				{if condition=" $order=='ng.sales' "}
					<dd class="curr">
					{if condition = " $sort=='asc' "}
						<a href="SHOP_MAIN/goods/goodslist.html?{$url_parameter_not_order}&order=ng.sales&sort=desc">销量
						<b style="background-position:-23px -169px"></b>
					{else/}
						<a href="SHOP_MAIN/goods/goodslist.html?{$url_parameter_not_order}&order=ng.sales&sort=asc">销量
						<b class="icon-order-DESCending"></b>
					{/if}
				{else/}
					<dd>
						<a href="SHOP_MAIN/goods/goodslist.html?{$url_parameter_not_order}&order=ng.sales&sort=desc">销量
						<b class="icon-order-DESCending"></b>
				{/if}
						</a>
					</dd>
					
				<!-- 新品 -->
				{if condition = " $order=='ng.is_new' "}
					<dd class="curr">
						{if condition = " $sort=='asc' "}
							<a href="SHOP_MAIN/goods/goodslist.html?{$url_parameter_not_order}&order=ng.is_new&sort=desc">新品
							<b style="background-position:-23px -169px"></b>
						{else/}
							<a href="SHOP_MAIN/goods/goodslist.html?{$url_parameter_not_order}&order=ng.is_new&sort=asc">新品
							<b class="icon-order-DESCending"></b>
						{/if}
				{else/}
						<dd>
							<a href="SHOP_MAIN/goods/goodslist.html?{$url_parameter_not_order}&order=ng.is_new&sort=desc">新品
							<b class="icon-order-DESCending"></b>
				{/if}
						</a>
					</dd>
				
				<!-- 价格 -->
				
				{if condition = " $order=='ng.price' "}
					<dd class="curr">
						{if condition = " $sort=='asc' && $order=='ng.price' "}
							<a href="SHOP_MAIN/goods/goodslist.html?{$url_parameter_not_order}&order=ng.price&sort=desc">价格
							<b style="background-position:-23px -169px"></b>
							
						{else/}
							<a href="SHOP_MAIN/goods/goodslist.html?{$url_parameter_not_order}&order=ng.price&sort=asc">价格
							<b class="icon-order-DESCending"></b>
						{/if}
					{else/}
					<dd>
							<a href="SHOP_MAIN/goods/goodslist.html?{$url_parameter_not_order}&order=ng.price&sort=desc">价格
							<b class="icon-order-DESCending"></b>
					{/if}
						</a>
					</dd>
				</dl>
				<div class="total">共 <span class="color" id="shops_count">{$total_count}</span>个商品&nbsp;</div>
				<dl class="order f-right">
					<!-- <dd class="first">
						<a href="javascript:;" style="position: relative;" onmouseout="hideAddress(this)" onmousemove="showAddress(this)">所在地<i class="address_home_down"></i> </a>
					</dd> -->
				</dl> 
			</div>
			 <div class="fore2">
				<div class="filter-btn">
					<span class="distribution">配送至</span>
					<div class="region-chooser-container region-chooser" style="z-index: 3">
						<div class="region-chooser-selected">
							<div class="region js-region">
								<font>{$user_location.province}{$user_location.city}<i></i></font>
							</div>
						</div>
						<div class="region-chooser-box" id="region-chooser-box" style="display: none;">
							<div class="region-chooser-close"></div>
							<div class="region-tabs">
								<div class="region-tab selected" data-region-level="1" style="display: block">
									{$user_location.province}<i></i>
								</div>
								<div class="region-tab" data-region-level="2" style="display: block">
									{$user_location.city}<i></i>
								</div>
								<div class="region-tab " data-region-level="3" style="display: block">
									请选择区/县<i></i>
								</div>
							</div>
							<div class="region-items" data-region-level="1"  style="display: block;"></div>
							<div class="region-items" data-region-level="2" style="display: none;"></div>
							<div class="region-items" data-region-level="3" style="display: none;"></div>
						</div>
						<div style="clear: both;"></div>
					</div>
					<!-- 选中的筛选条件给 a 标签追加类名 即  class="filter-tag curr" _star -->
					<!-- {if condition = "$platform_proprietary != '' && $platform_proprietary ==1"}
					<a href="SHOP_MAIN/goods/goodslist?{$url_parameter_not_platform_proprietary}" class="filter-tag curr">
					{else/}
					<a href="SHOP_MAIN/goods/goodslist?{$url_parameter}&platform_proprietary=1" class="filter-tag">
					{/if}
						<i class="icon"></i> <span class="text">平台直营</span>
					</a> -->
					
					{if condition = "$shipping_fee !='' && $shipping_fee ==0"} 
					<a href="SHOP_MAIN/goods/goodslist.html?{$url_parameter_not_shipping}" class="filter-tag curr">
					{else/}
					<a href="SHOP_MAIN/goods/goodslist.html?{$url_parameter}&shipping_fee=0" class="filter-tag ">
					{/if}
						<i class="icon" ></i><span class="text">包邮</span>
					</a>
					
					{if condition = "$stock !='' && $stock>=0"}
					<a href="SHOP_MAIN/goods/goodslist.html?{$url_parameter_not_stock}" class="filter-tag curr">
					{else/}
					<a href="SHOP_MAIN/goods/goodslist.html?{$url_parameter}&stock=0" class="filter-tag ">
					{/if}
						<i class="icon"></i><span class="text">仅显示有货</span>
					</a>
				</div>
				<div class="filter-mod">
					<!-- 选中样式为a标签添加curr样式 -->
					<div class="nch-sortbar-location">商品所在地：
						<div class="select-layer">
							<div class="holder">
								<em nc_type="area_name">
								{if condition="$province_name == ''"}
								不限地区
								{else/}
								{$province_name}
								{/if}
								</em>
							</div>
							<div class="selected">
								<a nc_type="area_name">
								{if condition="$province_name == ''"}
								不限地区
								{else/}
								{$province_name}
								{/if}
								</a>
							</div>
							<i class="direction"></i>
						</div>
					</div>
					<a href="javascript:;"  data-type="1" title="列表模式" class="filter-type filter-type-list js-filter-type">
						<span class="filter-type-icon"></span>
					</a>
					<a href="javascript:;" data-type="0" title="大图模式" class="filter-type filter-type-grid curr js-filter-type">
						<span class="filter-type-icon"></span>
					</a>
				</div>
			</div>
			<ul class="options">
				<div class="filter-detailc" id="addressDraw">
					<dl class="location-hots">
						<dt>常用地区</dt>
						<dd><a href="SHOP_MAIN/goods/goodslist.html?{$url_parameter_not_province_id}&province_id=1&province_name=北京">北京</a></dd>
						<dd><a href="SHOP_MAIN/goods/goodslist.html?{$url_parameter_not_province_id}&province_id=2&province_name=天津">天津</a></dd>
						<dd><a href="SHOP_MAIN/goods/goodslist.html?{$url_parameter_not_province_id}&province_id=9&province_name=上海">上海</a></dd>
					</dl>
					<dl class="location-all">
						<dt>省份</dt>
						<dd>
							<ul>
								<li>
									<p class="lt">A</p>
									<p class="lc"> 
										<span><a href="SHOP_MAIN/goods/goodslist.html?{$url_parameter_not_province_id}&province_id=12&province_name=安徽">安徽</a></span> 
										<span><a href="SHOP_MAIN/goods/goodslist.html?{$url_parameter_not_province_id}&province_id=33&province_name=澳门">澳门</a></span> 
									</p>
								</li>
								<li>
									<p class="lt">C</p>
									<p class="lc"> 
										<span><a href="SHOP_MAIN/goods/goodslist.html?{$url_parameter_not_province_id}&province_id=22&province_name=重庆">重庆</a></span> 
									</p>
								</li>
								<li>
									<p class="lt">F</p>
									<p class="lc"> 
										<span><a href="SHOP_MAIN/goods/goodslist.html?{$url_parameter_not_province_id}&province_id=13&province_name=福建">福建</a></span> 
									</p>
								</li>
								<li>
									<p class="lt">G</p>
									<p class="lc"> 
										<span><a href="SHOP_MAIN/goods/goodslist.html?{$url_parameter_not_province_id}&province_id=19&province_name=广东">广东</a></span> 
										<span><a href="SHOP_MAIN/goods/goodslist.html?{$url_parameter_not_province_id}&province_id=28&province_name=甘肃">甘肃</a></span> 
										<span><a href="SHOP_MAIN/goods/goodslist.html?{$url_parameter_not_province_id}&province_id=20&province_name=广西">广西</a></span> 
										<span><a href="">贵州</a></span> 
									</p>
								</li>
							</ul>
							<ul>
								<li>
									<p class="lt">H</p>
									<p class="lc"> 
										<span><a href="SHOP_MAIN/goods/goodslist.html?{$url_parameter_not_province_id}&province_id=21&province_name=海南">海南</a></span> 
										<span><a href="SHOP_MAIN/goods/goodslist.html?{$url_parameter_not_province_id}&province_id=3&province_name=河北">河北</a></span> 
										<span><a href="SHOP_MAIN/goods/goodslist.html?{$url_parameter_not_province_id}&province_id=16&province_name=河南">河南</a></span> 
										<span><a href="SHOP_MAIN/goods/goodslist.html?{$url_parameter_not_province_id}&province_id=8&province_name=黑龙江">黑龙江</a></span> 
										<span><a href="SHOP_MAIN/goods/goodslist.html?{$url_parameter_not_province_id}&province_id=17&province_name=湖北">湖北</a></span> 
										<span><a href="SHOP_MAIN/goods/goodslist.html?{$url_parameter_not_province_id}&province_id=18&province_name=湖南">湖南</a></span> 
									</p>
								</li>
								<li>
									<p class="lt">J</p>
									<p class="lc"> 
										<span><a href="SHOP_MAIN/goods/goodslist.html?{$url_parameter_not_province_id}&province_id=10&province_name=江苏">江苏</a></span> 
										<span><a href="SHOP_MAIN/goods/goodslist.html?{$url_parameter_not_province_id}&province_id=14&province_name=江西">江西</a></span> 
										<span><a href="SHOP_MAIN/goods/goodslist.html?{$url_parameter_not_province_id}&province_id=7&province_name=吉林">吉林</a></span> 
									</p>
								</li>
							</ul>
							<ul>
								<li>
									<p class="lt">N</p>
									<p class="lc"> 
										<span><a href="SHOP_MAIN/goods/goodslist.html?{$url_parameter_not_province_id}&province_id=6&province_name=辽宁">辽宁</a></span> 
										<span><a href="SHOP_MAIN/goods/goodslist.html?{$url_parameter_not_province_id}&province_id=5&province_name=内蒙古">内蒙古</a></span> 
										<span><a href="SHOP_MAIN/goods/goodslist.html?{$url_parameter_not_province_id}&province_id=30&province_name=宁夏">宁夏</a></span> 
									</p>
								</li>
								<li>
									<p class="lt">Q</p>
									<p class="lc"> <span><a href="SHOP_MAIN/goods/goodslist.html?{$url_parameter_not_province_id}&province_id=29&province_name=青海">青海</a></span> </p>
								</li>
								<li>
									<p class="lt">S</p>
									<p class="lc"> 
										<span><a href="SHOP_MAIN/goods/goodslist.html?{$url_parameter_not_province_id}&province_id=15&province_name=山东">山东</a></span> 
										<span><a href="SHOP_MAIN/goods/goodslist.html?{$url_parameter_not_province_id}&province_id=4&province_name=山西">山西</a></span> 
										<span><a href="SHOP_MAIN/goods/goodslist.html?{$url_parameter_not_province_id}&province_id=27&province_name=陕西">陕西</a></span> 
										<span><a href="SHOP_MAIN/goods/goodslist.html?{$url_parameter_not_province_id}&province_id=23&province_name=四川">四川</a></span> 
									</p>
								</li>
							</ul>
							<ul>
								<li>
									<p class="lt">T</p>
									<p class="lc"> <span><a href="SHOP_MAIN/goods/goodslist.html?{$url_parameter_not_province_id}&province_id=34&province_name=台湾">台湾</a></span> </p>
								</li>
								<li>
									<p class="lt">X</p>
									<p class="lc"> 
										<span><a href="SHOP_MAIN/goods/goodslist.html?{$url_parameter_not_province_id}&province_id=26&province_name=西藏">西藏</a></span> 
										<span><a href="SHOP_MAIN/goods/goodslist.html?{$url_parameter_not_province_id}&province_id=31&province_name=新疆">新疆</a></span> <span><a href="">香港</a></span> 
									</p>
								</li>
								<li>
									<p class="lt">Y</p>
									<p class="lc"> <span><a href="SHOP_MAIN/goods/goodslist.html?{$url_parameter_not_province_id}&province_id=25&province_name=云南">云南</a></span> </p>
								</li>
								<li>
									<p class="lt">Z</p>
									<p class="lc"> <span><a href="SHOP_MAIN/goods/goodslist.html?{$url_parameter_not_province_id}&province_id=11&province_name=浙江">浙江</a></span> </p>
								</li>
							</ul>
						</dd>
					</dl>
					<p class="oreder-default"><a href="SHOP_MAIN/goods/goodslist.html?{$url_parameter_not_province_id}">不限地区</a></p>
				</div>
			</ul>
		</form>
	</div>
	<!--主体商品内容展示-->
	<form name="compareForm" action="compare.php" method="post" onsubmit="" id="table_list">
		<div class="goodsList js-list-type" style="display: none;">
		<!-- JS加载商品列表数据【列表模式】 -->
		{foreach name="goods_list['data']" item="goods"} 
			<ul class="clearfix">
				<li class="thumb">
					<a href="SHOP_MAIN/goods/goodsinfo.html?goodsid={$goods.goods_id}" target="_blank" title="{$goods.goods_name}">
						<img src="__UPLOAD__/{$goods.pic_cover_mid}" class="pic_img_206" style="display: inline;">
					</a>
				</li>
				<li class="goodsName">
					<a href="SHOP_MAIN/shop/goods/goodsinfo.html?goodsid={$goods.goods_id}" target="_blank" title="{$goods.goods_name}">{$goods.goods_name}</a>
				</li>
				<li class="list_price">市场价： <font class="market">￥{$goods.market_price}</font><br> 本店售价： <font class="shop">￥{$goods.promotion_price}</font> <br></li>
				<li class="action">
					<a href="javascript:;" class="action-btn collet-btn  curr" onclick="collectionGoods({$goods.goods_id},'goods','{$goods.goods_name}',this,true)"> 
					 {if condition="$goods.is_favorite>0"}已收藏
					 {else/}
					 收藏
					 {/if}
					</a>
					<a href="SHOP_MAIN/goods/goodsinfo.html?goodsid={$goods.goods_id}" class="action-btn addcart-btn add-cart">加入购物车</a>
				</li>
			</ul>
		{/foreach}
		</div>
		<ul class="list-grid clearfix js-list-grid">
			{foreach name="goods_list['data']" item="goods" key="k"}
			<li class="item {if condition='$k neq 0 && ($k+1)%4==0'}last{/if}">
				<div class="item-con">
					<div class="item-pic">
						<a href="SHOP_MAIN/goods/goodsinfo.html?goodsid={$goods.goods_id}" title="{$goods.goods_name}" target="_blank">
							<img src="__UPLOAD__/{$goods.pic_cover_mid}">
						</a>
					</div>
					<div class="item-info">
						<div class="item-price"><em class="sale-price color">￥{$goods.promotion_price}</em></div>
						<div class="item-name"><a href="SHOP_MAIN/goods/goodsinfo.html?goodsid={$goods.goods_id}" target="_blank" title="{$goods.goods_name}">{$goods.goods_name}</a></div>
						<div class="item-con-info">
							<div class="fl">
								<div class="item-operate">
										<a href="javascript:;" class="operate-btn collet-btn  goods-collect" onclick="collectionGoods({$goods.goods_id},'goods','{$goods.goods_name}',this,false)">
										<i {if condition="$goods.is_favorite>0"}style="background-position:-107px -11px;"{/if} data-log-id="{$goods.is_favorite}"></i>
										<span> {if condition="$goods.is_favorite>0"}已收藏
					 							{else/}收藏{/if}
					 					</span>
									</a>
									<a href="SHOP_MAIN/goods/goodsinfo.html?goodsid={$goods.goods_id}#goods_evaluate" target="_blank" class="operate-btn comment-btn"><i></i> {$goods.evaluates}</a>
								</div>
								<!-- <div class="item-shop">
									<a href="SHOP_MAIN/shop/shopindex?shop_id={$goods.shop_id}" target="_blank" title="{$platform_shopname}">
										<span class="dsrs">
										{if condition="$goods.shop_type==1"}
										直营
										{else/}
										普通
										{/if}
										</span>
										<span>{$goods.shop_name}</span>
									</a>
								</div> -->
							</div>
							<div class="fr">
								<div class="item-add-cart">
									<a href="javascript:ShowGoodsAttribute({$goods.goods_id},'{$goods.goods_name}',{$goods.pic_id},this,{if condition='$goods.max_buy==0' }{$goods.stock}{else/}{$goods.max_buy}{/if});" class="add-cart" title="加入购物车" style="background-image: url(__TEMP__/{$style}/public/images/add-cart.jpg)"></a>
									{foreach name="goods['sku_list']" item="pro_skus" key="k"}
									<input type="hidden" name="goods_sku{$goods.goods_id}" value="{$pro_skus.attr_value_items};" stock="{$pro_skus.stock}" {if condition = "$goods.promotion_info neq ''"} price="{$pro_skus.promote_price}" {else/} price="{$pro_skus.price}"{/if} skuid="{$pro_skus.sku_id}" skuname="{$pro_skus.sku_name}">
									{/foreach}
								</div>
							</div>
						</div>
					</div>
				</div>
			</li>
			{/foreach}
		<!-- JS加载商品列表数据【大图模式】 -->
		</ul>
		{if condition="$total_count==0"}
		<div class="tip-box">
			<i class="tip-icon"></i>
			<div class="tip-text">Sorry！没有找到您想要的商品……</div>
		</div>
		{/if}
		
		{include file='shop/b2c/Goods/controlPopUpGoodsSkuAttribute'/}
		<!--分页-->
		<div class="js-show-page">
		{include file='shop/b2c/controlCommonPage'/}
		</div>
	</form>
</div>